package HomeWork;
/*
定义猫类Cat。属性:毛的颜色color，品种breed。行为:吃饭eat()，抓老鼠catchMouse()

花色的波斯猫正在吃鱼.....

	花色的波斯猫正在逮老鼠....

 */
public class Cat {
    private String color;//毛色
    private String breed;
//Constructor==========================================================
    public Cat(){

    }

    public Cat(String color, String breed) {
        this.color = color;
        this.breed = breed;
    }
//get and set==========================================================
    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getBreed() {
        return breed;
    }

    public void setBreed(String breed) {
        this.breed = breed;
    }
//method==================================================================
    public void eat(){
        System.out.println(this.color+"的"+this.breed+"正在吃鱼.....");
    }

    public void catchMouse(){
        System.out.println(this.color+"的"+this.breed+"正在逮老鼠....");
    }



}
